﻿using PRO.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.UI.WebControls;

namespace PRO.Admin
{
    public class ManageBase : System.Web.UI.Page
    {
        public AdminInfo admininfo = new AdminInfo();
        protected override void OnLoad(EventArgs e)
        {
            admininfo = AdminLib.GetAdminInfo();
            if (admininfo==null||admininfo.ID <= 0)
                Response.Redirect("/Manage/login.aspx");
            else
            {
                Literal Literal_UserInfo = (Literal)(this.Page.Master.FindControl("Literal_UserInfo"));
                if (Literal_UserInfo != null)
                {
                    Literal_UserInfo.Text = admininfo.UserName + " , 欢迎登录    【<a target=\"_blank\" href=\"/\">网站首页</a>】【<a href=\"/Manage/rePwd.aspx\">修改密码</a>】【<a href=\"/Manage/removecache.aspx?url=" + ((Request.Url.ToString().ToLower().Contains("removecache")) ? "" : Request.Url.ToString()) + "\">清除缓存</a>】【<a href=\"/Manage/login.aspx?action=logout\" onclick=\"return confirm('确定退出登陆？');\">退出登陆</a>】";
                }
            }
            base.OnLoad(e);
        }
    }
}
